package com.frxuexi.mymvi

import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetWorkFactory
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

@OptIn
class NewsRepository @Inject constructor() {
//    val apiService by lazy { RetrofitManager.getRetrofit().create(ApiService::class.java) }
    val apiService by lazy { NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java)}


    fun getNews(page:Int):Flow<NewsEntity>{
        return apiService.getNews(page)
    }
}